package com.itheima.homework6;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;
import java.util.TreeMap;

public class Demo6_Map_Reader {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
                new FileReader("d13_zuoye_IO_String/msg.txt"));
        TreeMap<String,String> map = new TreeMap<>();
        String s;
        while ((s=br.readLine())!=null){
            String[] split = s.split("=");
            map.put(split[0],split[1]);
        }
        br.close();
        map.forEach((k,v)-> System.out.println(k+"="+v));
        /*Properties prop = new Properties();
        prop.load(br);
        System.out.println(prop);*/
    }
}
